<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=8">
<meta http-equiv="Expires" content="0">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-control" content="no-cache">
<meta http-equiv="Cache" content="no-cache">
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <title>添加地址</title>
    <script src="javascript/jquery.min.js"></script>
    <script src="javascript/function.js"></script>
    <link rel="stylesheet" href="stylesheet/style_v1.1.css">
</head>
<body>
<div class="header-title">
    <a href="javascript:void(0);" class="fanhui">
        <img src="image/tick.png" alt="">
    </a>
    <p>添加地址</p>
</div>
<div class="con padding-top60 padding-bottom50 padding-lr5">
    <div class="adds-from">
        <input type="text" placeholder="姓名" id="userName">
        <input type="text" placeholder="电话" id="mobile">
<!--         <div class="xl"> -->
<!--             <select> -->
<!--                 <option>1</option> -->
<!--                 <option>2</option> -->
<!--                 <option>3</option> -->
<!--             </select> -->
<!--             <select> -->
<!--                 <option>1</option> -->
<!--                 <option>asdfasdfasdfasdfasdfsadf</option> -->
<!--                 <option>3</option> -->
<!--             </select> -->
<!--             <select> -->
<!--                 <option>1</option> -->
<!--                 <option>2</option> -->
<!--                 <option>3</option> -->
<!--             </select> -->
<!--         </div> -->
        <input type="text" placeholder="详细地址" id="address"> 
    </div>
    <a href="javascript:void(0);" class="btn" onclick="saveAddress();">确认添加</a>
</div>
     <%@ include file="footer.jsp"%>
<script>
$(function () {
});
function saveAddress(){
	var params = "parms.openId=" + "1";
	params += "&parms.userName=" + $("#userName").val();
	params += "&parms.mobile=" +  $("#mobile").val();
	params += "&parms.address=" +  $("#address").val();
	$.ajax({
				type : 'post',
				url : 'cliffordAction!saveAddress.action',
				async : false,
					data : params, // 传给action的参数
				success : function(data) {
					if (data.result == 1) {
						window.location.href="forwardPage_addressList.action";
					} else {
						alert(data.msg);
					}
				}
			});
}
</script>
</body>
</html>